package com.umeox.moto.watch.themes.widget;

import android.graphics.Rect;
import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

public class ItemDecoration extends RecyclerView.ItemDecoration {

    private int mHorizontalSpace;
    private int mVerticalSpace;

    public ItemDecoration(int horizontalSpace, int verticalSpace) {

        mHorizontalSpace = horizontalSpace;
        mVerticalSpace = verticalSpace;
    }

    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {

        RecyclerView.LayoutManager layoutManager = parent.getLayoutManager();
        if (layoutManager == null) {
            return;
        }
        outRect.bottom = mVerticalSpace;
    }
}
